<?xml version="1.0" encoding="utf-8"?>

<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:maml="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:doc="http://ddue.schemas.microsoft.com/authoring/internal" targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5" elementFormDefault="qualified" attributeFormDefault="unqualified">
		
  <!-- Schema documentation -->
  <annotation>
    <documentation>
      This schema definition defines question and answer types for the CS Schema.
      This schema is part of the base layer.
    </documentation>
  </annotation>

  <include schemaLocation="structure.xsd" />	
	
  <!-- element declarations -->
  <element name="glossary">
    <annotation>
      <documentation>
        The glossary element describes a set of terms and their definitions.
      </documentation>
      <appinfo>
        <doc:localizable>n/a</doc:localizable>
      </appinfo>
    </annotation>
    <complexType>
      <sequence>
        <element ref="maml:title" />
        <choice>
          <element ref="maml:glossaryDiv" maxOccurs="unbounded" />
          <element ref="maml:glossaryEntry" maxOccurs="unbounded" />
        </choice>
      </sequence>
      <attribute name="contentType" type="token" />
      <attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup" />
    </complexType>
  </element>

  <element name="glossaryDiv">
    <annotation>
      <documentation>
        The glossaryDiv element describes a titled division within a glossary.
      </documentation>
      <appinfo>
        <doc:localizable>n/a</doc:localizable>
      </appinfo>
    </annotation>
    <complexType>
      <sequence>
        <element ref="maml:title" />
        <element ref="maml:glossaryEntry" maxOccurs="unbounded" />
      </sequence>
      <attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup" />
      <attribute name="class" type="string" />
    </complexType>
  </element>

  <element name="glossaryEntry">
    <annotation>
      <documentation>
        The glossaryEntry is a single definition in the glossary with a set of terms attached.
      </documentation>
      <appinfo>
        <doc:localizable>n/a</doc:localizable>
      </appinfo>
    </annotation>
    <complexType>
      <sequence>
        <element ref="maml:terms" />
        <element ref="maml:definition" />
        <element name="relatedEntry" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <appinfo>
              <doc:localizable>n/a</doc:localizable>
            </appinfo>
          </annotation>
          <complexType>
            <attribute name="termId" type="token" use="required" />
            <attribute name="relationType" type="string" use="required" />
          </complexType>
        </element>
      </sequence>
      <attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup" />
      <attribute name="platform" type="string" use="optional" />
      <attribute name="product" type="string" use="optional" />
    </complexType>
  </element>

  <element name="terms">
    <annotation>
      <documentation>
        The various terms that are associated with this entry. Each term has attributes to specify its use and other idenitfying attributes
      </documentation>
      <appinfo>
        <doc:localizable>n/a</doc:localizable>
      </appinfo>
    </annotation>
    <complexType>
      <sequence maxOccurs="unbounded">
        <element name="term">
          <annotation>
            <appinfo>
              <doc:localizable>true</doc:localizable>
            </appinfo>
          </annotation>
          <complexType mixed="true">
            <attribute name="termClass" type="string" use="required" />
            <attribute name="partOfSpeech" type="string" use="optional" default="noun" />
            <attribute name="geographicalUsage" type="string" use="optional" />
            <attribute name="language" type="string" use="optional" />
          </complexType>
        </element>
      </sequence>
    </complexType>
  </element>

</schema>